﻿@{
    var pageCount = (int)ViewData["pageCount"];
    var pageIndex = (int)ViewData["pageIndex"];
    var pageSize = (int)ViewData["pageSize"];
}
<div>
    <ul class="pagination">
        <li><a href="javascript:showPaging(@(pageIndex==1?1:pageIndex-1))" aria-label="上一页"><span aria-hidden="true">&laquo;</span></a> </li>
        @for (int i = 1; i <= pageCount; i++)
        {
            if (i == pageIndex)
            {
            <li class="active"><a href="javascript:showPaging(@i)">@i</a></li>
            }
            else
            {
            <li><a href="javascript:showPaging(@i)">@i</a></li>
            }
        }
        <li><a href="javascript:showPaging(@(pageIndex==pageCount?pageCount:pageIndex+1))" aria-label="下一页"><span aria-hidden="true">&raquo;</span></a></li>
    </ul>
</div>
